import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import {LogMiddleware} from './middlewares/log.middleware'
import {AuthGuard} from './guard/auth.guard'
async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  //全局中间件
  app.use(new LogMiddleware().use)
  //全局守卫
  // app.useGlobalGuards(new AuthGuard())
  await app.listen(3000);
}
bootstrap();
